import request from '@/utils/request'
export default {
    //品种添加到本地
    importPublicList(breedTypeListStr = 'fish', list = []) {
        return request.post("/v3/templateTenant/plantVariety/importPublicListFish", {
            farmingTypeNo: 'sc',
            list: list,
            farming:'FISH',
            breedType: breedTypeListStr || 'fish',
            organizationNo: sessionStorage.organizationNo
        });
    },
    //编辑
    edit(data) {
        return request.post("/v3/templateTenant/plantVariety/edit", {
            ...data
        });
    },
    //本地品种
    queryPageByCondition(params) {
        return request.post("/v3/templateTenant/plantVariety/queryPageByCondition", {
            page: params.page,
            size: params.size,
            auditFlag: 1,
            entity: {
                breedType: 'fish',
                ...params.entity || {},
                farming: sessionStorage.farming,
                farmingTypeNo: sessionStorage.farmingTypeNo
            }
        })
    },
    queryByCondition(data) {
        return request.post("/v3/templateTenant/plantVariety/queryByCondition", {
            ...data,
            breedType: 'fish',
            farming: sessionStorage.farming,
        })
    },
    //删除品种
    delList(list) {
        return request.post("/v3/templateTenant/plantVariety/delListByNo", {
            list: list,
            organizationNo: sessionStorage.organizationNo,
            farming:sessionStorage.farming,
            breedType: 'fish',
            farmingTypeNo: 'sc',
        });
    }
};
